package com.hxm.demo.huawei;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class TestHJ3 {

    /**
     * HJ3 明明的随机数
     *
     * @param args
     */
//    public static void main(String[] args) {
//        Scanner in = new Scanner(System.in);
//        // 注意 hasNext 和 hasNextLine 的区别
//        TreeSet treeSet = new TreeSet();
//        while (in.hasNextInt()) { // 注意 while 处理多个 case
//            int a = in.nextInt();
//            for (int i = 0; i < a; i++) {
//                int b = in.nextInt();
//                treeSet.add(b);
//            }
//        }
//        Iterator iterator = treeSet.iterator();
//        while (iterator.hasNext()){
//            System.out.println(iterator.next());
//        }
//    }
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        while ((str = br.readLine()) != null) {
            boolean[] booleans = new boolean[1000];
            StringBuffer sb = new StringBuffer();
            int a = Integer.parseInt(str);
            for (int i = 0; i < a; i++) {
                int b = Integer.parseInt(br.readLine());
                booleans[b] = true;
            }
            for (int i = 0; i < booleans.length; i++) {
                if (booleans[i]) {
                    sb.append(i).append("\n");
                }
            }
            System.out.println(sb.substring(0, sb.length() - 1));
        }
    }
}
